package test1202;

import com.qf.bean.Student2;
import com.qf.bean.Wife;
import com.qf.service.Student2Service;
import com.qf.service.WifeService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * 2019/12/2
 * Administrator
 * springdata1130
 * 面向对象面向君  不负代码不负卿
 */
public class Demo4 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("springData.xml");
        Student2Service service=(Student2Service) applicationContext.getBean("stuservice");


     /*   List<Student2> student2List = service.findbygid2(1);
        for (Student2 student2 : student2List) {
            System.out.println(student2);
        }*/
        Student2 student2 = service.findbyid(1,"%三%");
        System.out.println(student2.getSname());
       /* List<Student2> student2List = service.getStudentsBygid(1);
        for (Student2 student2 : student2List) {
            System.out.println(student2);
        }*/
    }
}
